package org.uim.cricket.db.impl;

import java.sql.SQLException;

import org.uim.cricket.db.DBThread;

public abstract class DBBooleanResultQuery {

	public boolean result(String theQuery) throws SQLException {
		DBThread dbt = new DBThread(theQuery);
		dbt.run();
		
		boolean result = false;
		if (dbt.getResultSet().next()) {
			String r = dbt.getResultSet().getString(1);
			if (r.equalsIgnoreCase("true")) 
				result = true;
		}
		dbt.close();
		
		return result;
	}
	
}
